package com.tn.wservice.validator;

import java.util.HashMap;
import java.util.Map;

import com.tn.bo.Company;
import com.tn.bo.UserProfile;

public class LoginValidationResult extends ValidationResultImp {

	private boolean isCompanyAdmin = false;
	private UserProfile userProfile = null;
	private Company userCompany = null;
	private String userName = null;
	private Map<String, Object> userMap = new HashMap<String, Object>();
	
	public static final String LOGIN_USER_NAME = "LOGIN_USERNAME";
	public static final String LOGIN_USER_COMPANY = "LOGIN_COMPANY";
	public static final String LOGIN_USER_PROFILE = "LOGIN_PROFILE";
	public static final String LOGIN_USER_IS_ADMIN = "LOGIN_ISADMIN";
	
	public boolean isCompanyAdmin() {
		return isCompanyAdmin;
	}

	public void setCompanyAdmin(boolean isCompanyAdmin) {
		userMap.put(LOGIN_USER_IS_ADMIN, isCompanyAdmin);
		this.isCompanyAdmin = isCompanyAdmin;
	}

	public UserProfile getUserProfile() {
		return userProfile;
	}

	public void setUserProfile(UserProfile userProfile) {
		userMap.put(LOGIN_USER_PROFILE, userProfile);
		this.userProfile = userProfile;
	}

	public Company getUserCompany() {
		return userCompany;
	}

	public void setUserCompany(Company userCompany) {
		userMap.put(LOGIN_USER_COMPANY, userCompany);
		this.userCompany = userCompany;
	}

	public void setUserName(String userName) {
		userMap.put(LOGIN_USER_NAME, userName);
		this.userName = userName;
	}

	public String getUserName() {
		return userName;
	}

	public Map<String, Object> getUserDetailMap() {
		return userMap;
	}
}
